package lambda;

import java.util.Arrays;
import java.util.List;

/**
 * 功能描述:
 *
 * @author liping(lpaidd50@gmail.com)
 * @version v1.0
 * @date 2016/8/15
 */
public class LambdaMain {
	public static void main(String[] args) {
		String[] atp = {	"Rafael Nadal", "Novak Djokovic", "Stanislas Wawrinka",
							"Juan Martin Del Potro" };
		List<String> players = Arrays.asList(atp);
		// 以前的循环方式
		//		for (String player : players) {
		//			System.out.print(player + "; ");
		//		}
		// 使用 lambda 表达式以及函数操作(functional operation)
		System.out.println("1111111dd11");
		players.forEach((player) -> System.out.println(player + "; "));
		System.out.println("111111111");
		
	}
}
